test: allow scheduling headroom in timeout regressions - #199
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Prepared head: dd75865. Both the complete suite (924 passed, 2 platform skips) and final focused timeout run (23 passed, 2 platform skips) passed locally; typecheck/lint passed. Built CLI init/map/status succeeded on a synthetic Node/Rust repository. The configured 50/80ms command timeouts still produce timeout failures and explicit bounded-return assertions remain. CI is green on this head: https://github.com/openclaw/clawpatch/actions/runs/34112758456 (Linux full suite/package smoke and Windows exec tests). CodeQL and secret scans passed. Codex branch autoreview against origin/main is scoped-clean at P2 after addressing its initial concern about preserving explicit return bounds. Ready for orchestrator squash; not merged in this preparation phase. The final notes PR will carry the maintenance changelog entry. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 7:32 AM ET / 11:32 UTC. ClawSweeper reviewWhat this changesThe PR gives three subprocess timeout tests more scheduling headroom while retaining explicit return-time bounds and timeout error checks. Merge readiness✅ Ready for maintainer review This remains a useful, bounded test reliability change absent from current main. The new runtime evidence resolves the previous proof blocker, and no actionable patch defects remain. Priority: P3 Review scores
Verification
How this fits togetherClawpatch runs subprocesses for validation and publishing pull requests. These tests check that hanging commands and inherited output pipes return bounded timeout failures to the CLI. flowchart LR
A[Timeout regression tests] --> B[Command runner]
A --> C[Pull request publishing]
C --> B
B --> D[Hanging subprocesses]
D --> E[Deadline and process cleanup]
E --> F[Timeout errors and bounded return]
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Keep realistic scheduling allowances in subprocess tests while preserving short command deadlines, explicit return bounds, and timeout failure assertions. Do we have a high-confidence way to reproduce the issue? Not applicable to a production bug: this PR adjusts test timing tolerance. The contributor reports unchanged-main failures at 1.65–1.89 seconds; this review did not independently reproduce host scheduling delays. Is this the best way to solve the issue? Yes. The narrow test-only adjustment preserves meaningful hang detection and timeout diagnostics without changing operator deadlines or adding configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f71d92f0069. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Actual timeout proof from an isolated checkout built at
The inherited-stdio probe ran a real parent and descendant through the built node dist/cli.js open-pr --root <fixture> --patch pat_timeout_proof --base main --branch clawpatch/pat_timeout_proof --json --quietA local bare Git remote and hanging executables exercised The exact-head Linux/Windows CI remains green: https://github.com/openclaw/clawpatch/actions/runs/34112758456. This supplies the requested inspectable timeout behavior in addition to the already-passing test suite and clean P2 branch autoreview. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Real subprocess timeout tests intermittently failed on busy hosts because the 1.5-second return assertion included process startup and scheduling delays. The prior sweep reproduced this on unchanged main (1.65–1.89 seconds).
Keep explicit 5-second return assertions, timeout exit codes, and timeout error checks. Give the test runner additional setup/cleanup headroom. Production timeouts are unchanged.
Validation: typecheck and lint passed; the full suite passed (924 tests, 2 platform skips), and the final focused run passed (23 tests, 2 platform skips). The built CLI completed init/map/status on a synthetic Node/Rust repository. Codex autoreview of the working change was clean at P2 after preserving explicit return-time assertions.
Local package smoke also exposed a separate pre-existing compatibility issue: a globally installed pnpm 12 rejects the prepack script's
-salias before honoring the pinned package manager. That repair belongs to the final tooling/notes PR. This PR contains tests only; the final notes PR will consolidate the maintenance entry.Targeted runtime proof
Actual timeout proof from an isolated checkout built at
dd75865cc35593816832814bf11aafbe6654d00a, on macOS arm64 / Node 24.20.0:The inherited-stdio probe ran a real parent and descendant through the built
dist/exec.js. The publishing probes ran the built CLI:A local bare Git remote and hanging executables exercised
git pushandgh pr create; no external push or PR creation occurred. Each process wrote a readiness marker before its timeout. All three errors containedcommand timed out after <configured deadline>ms. The 500 ms probes allow process startup before testing the hang; the regression tests retain their 50/80 ms deadlines and 5-second return bounds.The exact-head Linux/Windows CI remains green: https://github.com/openclaw/clawpatch/actions/runs/34112758456. This supplies the requested inspectable timeout behavior in addition to the already-passing test suite and clean P2 branch autoreview.